#ifndef _TCP_H_
#define _TCP_H_

#include <stdio.h>

#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <stdlib.h>
#include <unistd.h>
#include <strings.h>
#include <string.h>
#include <arpa/inet.h>
#include <errno.h>
#include <stdbool.h>

#define ErrExit(msg) do { perror(msg); \
	exit(EXIT_FAILURE); } while(0)

#define BACKLOG 5


typedef struct sockaddr Addr;
typedef struct sockaddr_in Addr_in;
typedef int (* func_t)(int, const Addr *, socklen_t);

void Argment(int argc, char*argv[]);
int SocketInit(char *argv[], bool server);
#endif
